/**
 * Created by DukeCrushIt on 2015/7/29.
 */
class PlayerInfo {
    public accountId:number=0;
    public classify:number=0;//0 没有选择养猫还是养狗 1 养猫 2 养狗 3 both
    public device:number=0;
    public diamond:number=0;
    public lastLoginTime:number=0;
    public id:number=0;
    public msk:string="";//占位用的
    public name:string="player1100";
    public platform:string = "";
    public funMsk:string;

    //充值和vip相关
    public totalCharge:number;//占位用的
    public vipLevel:number;
    public vipScore:number;

    public figureurl:string;//头像地址
    public lotteryCount:number=0;//礼包次数
    public step:number;
    public rank:number=0;

    public catHair:number = 0;
    public dogHair:number = 0;

    public sproutPoint:number;
    //tengxun platformrelated
    public score:number=0;//stars counts of wanba
    public is_vip:boolean;
    public vip_level:number;
    public expiretime:number;

    //extended by me
    public myType:number;
    public constructor(data:any){
        if( data != null && data != undefined)
            this.initFromData(data);
    }
    public initFromData(data:any){
        this.accountId = data.accountId;
        this.device = data.device;
        this.figureurl = data.figureurl;
        this.diamond = data.diamond;
        this.name = data.name;
        this.platform = data.platform;//PlatformEnum.QQBROWSER;
        this.lastLoginTime = data.lastLoginTime;
        this.id = data.id;
        this.lotteryCount = data.lotteryCount;
        this.msk = data.msk;
        this.step = data.step;
        this.classify = data.classify;
        this.funMsk = data.funMsk;
        this.totalCharge = data.totalCharge;
        this.vipLevel = data.vipLevel;
        this.vipScore = data.vipScore;
        this.sproutPoint = data.sproutPoint;
    }
}